﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace M3U8下载神器
{
    public class Broadcast
    {
        public delegate void  Listener(object sender, object target, int code, object msg);

        Listener listeners;
        public Broadcast()
        {
            
        }
        public void Add(Listener listener)
        {
            listeners += listener;
        }
        public void Remove(Listener listener)
        {
            listeners -= listener;
        }
        public void SendMsg(object sender,object target,int code, object msg)
        {
            listeners?.Invoke(sender, target, code, msg);
        }
    }
}
